package com.gxa.learning.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 培训计划的实体类
 *
 * @author YXQ
 * @date 2021/12/2 16:45
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_train_plan")
public class TrainPlan implements Serializable {
    /**
     * 计划的编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "plan_id")
    private Long id;

    /**
     * 计划的标题
     */
    @Column(name = "plan_title")
    private String title;

    /**
     * 计划的开始时间
     */
    @Column(name = "plan_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm;ss", timezone = "GMT+8")
    private Date start;

    /**
     * 计划的结束时间
     */
    @Column(name = "plan_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm;ss", timezone = "GMT+8")
    private Date end;

    /**
     * 计划的附件
     */
    @Column(name = "plan_document")
    private String document;

    /**
     * 计划的预算-总额
     */
    @Column(name = "plan_budget")
    private Long budget;

    /**
     * 计划的状态1.审批中2.审批通过3.审批未通过
     * 新建的计划默认状态是1
     */
    @Column(name = "type")
    private String type;

    /**
     * 计划的类型
     */
    @Column(name = "plan_type")
    private String planType;

    /**
     * 计划的创建时间
     */
    @Column(name = "plan_create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm;ss", timezone = "GMT+8")
    private Date create;
}
